//
//  QRCodeHTMLViewController.m
//  JST
//
//  Created by 蔡正军on 15/7/17.
//  Copyright (c) 2015年 aniuge. All rights reserved.
//

#import "QRCodeHTMLViewController.h"

@interface QRCodeHTMLViewController ()

@end

@implementation QRCodeHTMLViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self loadRemoteHTML];
}

- (UIWebView *)webView {
    
    if (_webView == nil) {
        
        _webView  = [[UIWebView alloc] init];
        
        _webView.backgroundColor = [UIColor whiteColor];
        
        _webView.frame = self.view.bounds;
        
        _webView.top = 64;
        
    }
    
    return _webView;
}

- (void)viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:animated];
    self.webView.top = 0;
}

- (void)loadRemoteHTML
{
    NSURL *url = [NSURL URLWithString:self.urlString];
    self.webView.delegate = self;
    [self.webView loadRequest:[NSURLRequest requestWithURL:url]];
    
    [self.view addSubview:self.webView];
    
}//加载远程HTML页面

#pragma mark - webview代理方法
- (void)webViewDidStartLoad:(UIWebView *)webView
{
    
}

- (void)webViewDidFinishLoad:(UIWebView *)webView
{
    
}

@end
